<template>
	<div class="swaper">
  <swiper :options="swiperOption" v-if='swiperShow'>
    <!-- slides -->
    <swiper-slide v-for='item in swiperList' ><img :src='item.imgUrl' class="swiper-img"/></swiper-slide>
   

    <!-- Optional controls -->
    <div class="swiper-pagination"  slot="pagination"></div>

  </swiper>
  </div>
</template>

<script>
	export default {
		name:'HomeSwiper',
		data() {
      return {
        swiperOption: {
        pagination:'.swiper-pagination',
        loop:true
        }
    }
   },
   props:{
   	swiperList:Array
   },
   computed :{
   		swiperShow(){
   			return this.swiperList.length
   		}
   }
	
	}
</script>

<style lang='stylus' scoped>
.swiper-img
	width: 100%;
	height: 166px;
.swaper >>> .swiper-pagination-bullet-active{
	background: #fff !important;
}
 
.swaper
	width: 100%;
	height: 0;
	overflow: hidden;
	padding-bottom: 42%;
	background: #eee;


</style>